import React, {
    Fragment
} from 'react'
import {
    Router,
    Route,
    Switch
} from 'dva/router'
import IndexPage from '../routes/IndexPage'
import BowerPage from '../routes/BowerPage'

export default function RouterConfig({
    history
}) {
    const route = () => {
        return (
            <Fragment>
                <Switch>
                    {/* <Route path='/' exact component={Product}></Route> */}
                    <Route path='/one' component={IndexPage}></Route>
                    <Route path='/two' exact component={BowerPage}></Route>
                </Switch>
            </Fragment>
        )
    }

    return <Router history={history}>{route()}</Router>
}